﻿<Window x:Class="ControlDemos.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Title="ControlDemos" Height="600" Width="800">
    <Window.Resources>
        <XmlDataProvider x:Key="samples" Source="Examples.xml" />
    </Window.Resources>
    <DockPanel DataContext="{Binding  Source={StaticResource samples}, XPath=Examples/Example}">
        <DockPanel Width="160" DockPanel.Dock="Left">
            <Slider DockPanel.Dock="Bottom" x:Name="ScaleSlider" ToolTip="LayoutTransform scale" Value="1" Minimum="1" Maximum="3" Margin="8"/>
            <ListBox ItemsSource="{Binding}" DisplayMemberPath="@Title" IsSynchronizedWithCurrentItem="True" Margin="4"/>
        </DockPanel>
        <Frame Source="{Binding XPath=@Page}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" NavigationUIVisibility="Hidden" Focusable="false">
            <Frame.LayoutTransform>
                <ScaleTransform ScaleX="{Binding Value, ElementName=ScaleSlider}" ScaleY="{Binding Value, ElementName=ScaleSlider}" />
            </Frame.LayoutTransform>
        </Frame>
    </DockPanel>
</Window>